﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Lab6
{
    public partial class ImageDialog : Form
    {
        int click;
        public int newImageWidth
        {
            get;
            set;
        }
        public int newImageHeight
        {
            get;
            set;
        }
        public ImageDialog()
        {
            InitializeComponent();
        }

        private void OKButton_Click(object sender, EventArgs e)
        {             
            switch (click) {
                case 1: newImageWidth = 640;
                        newImageHeight = 480;
                    break;
                case 2: newImageWidth = 800;
                        newImageHeight = 600;
                    break;
                case 3: newImageWidth = 1024;
                        newImageHeight = 768;
                    break;                
            }
        }

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            click = 1;
            //this.Width = 640;
            //this.Height = 480;
        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            click = 2;
            //this.Width = 800;
            //this.Height = 600;
        }

        private void radioButton3_CheckedChanged(object sender, EventArgs e)
        {
            click = 3;
            //this.Width = 1024;
            //this.Height = 768;
        }
    }
}
